import net from '../index'
import url from '../url'

/**
 * 预警指标管理
 */
export const queryWarningKpi = (query) => {
  return net.post(url.queryWarningKpi, query)
}
export const addWarningKpi = (query) => {
  return net.post(url.addWarningKpi, query)
}
export const querySingleWarningKpi = (query) => {
  return net.post(url.querySingleWarningKpi, query)
}
export const editWarningKpi = (query) => {
  return net.post(url.editWarningKpi, query)
}
export const delWarningKpi = (query) => {
  return net.post(url.delWarningKpi, query)
}
/**
 * 预警规则管理
*/
export const queryAlertRules = (query) => {
  return net.post(url.queryAlertRules, query)
}
export const addAlertRules = (query) => {
  return net.post(url.addAlertRules, query)
}
export const querySingleAlertRule = (query) => {
  return net.post(url.querySingleAlertRule, query)
}
export const editAlertRules = (query) => {
  return net.post(url.editAlertRules, query)
}
export const delAlertRules = (query) => {
  return net.post(url.delAlertRules, query)
}
export const indeCodeOption = (query) => {
  return net.post(url.indeCodeOption, query)
}

/**
  * 预警查询
*/
export const queryWarningQuery = (query) => {
  return net.post(url.queryWarningQuery, query)
}
export const closedWarningQuery = (query) => {
  return net.post(url.closedWarningQuery, query)
}
/**
 * 指标定义
*/
export const queryTargtDefine = (query) => {
  return net.post(url.queryTargtDefine, query)
}
export const addTargetDefine = (query) => {
  return net.post(url.addTargetDefine, query)
}
export const querySingleTargetDefine = (query) => {
  return net.get(url.querySingleTargetDefine, query)
}
export const editTargetDefine = (query) => {
  return net.post(url.editTargetDefine, query)
}
// 规则设置
export const queryRuleSetting = (query) => {
  return net.post(url.queryRuleSetting, query)
}
export const addRuleSetting = (query) => {
  return net.post(url.addRuleSetting, query)
}
export const querySingleRuleSetting = (query) => {
  return net.get(url.querySingleRuleSetting, query)
}
export const editRuleSetting = (query) => {
  return net.post(url.editRuleSetting, query)
}
export const queryAllCompanyList = (query) => {
  return net.post(url.queryAllCompanyList, query)
}
// 指标数据
export const queryTargetData = (query) => {
  return net.post(url.queryTargetData, query)
}
// 预警
export const queryWarningDetail = (query) => {
  return net.post(url.queryWarningDetail, query)
}
